<div id="tabs">
	<ul>
        <li id="current"><?php echo $this->Html->link(__('Kênh Của Trung Tâm', true), array('controller' => 'kenhs', 'action' => 'index',$donvi_id)); ?> </li>
        <li><?php echo $this->Html->link(__('Thêm Kênh', true), array('controller'=>'kenhs','action' => 'themkenh')); ?></li>
	</ul>
</div>
<div class="index">
	<h2><?php __('Các kênh bán hàng Của Trung Tâm');?></h2>
  <?php
	   echo $this->Html->link(__('Xuất Excel', true), array('action' => 'indexexcel',$donvi_id));

?>
	<table cellpadding="0" cellspacing="0" id="tables">
	<tr>
			<th><?php echo 'STT';?></th>
			<th><?php echo 'Mã kênh';?></th>
			<th><?php echo 'Tên kênh';?></th>
			<th><?php echo 'Địa chỉ';?></th>
			<th><?php echo 'SĐT';?></th>
			<th><?php echo 'Loại Kênh';?></th>
			<th class="actions"><?php __('Lựa chọn');?></th>
	</tr>
	<?php
	$i = 0;$stt=0;
	foreach ($kenhs as $kenh):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $stt=$stt+1; ?>&nbsp;</td>
		<td><?php echo $kenh['Kenh']['makenh']; ?>&nbsp;</td>
		<td><?php echo $kenh['Kenh']['tenkenh']; ?>&nbsp;</td>
		<td><?php echo $kenh['Kenh']['diachi']; ?>&nbsp;</td>
		<td><?php echo $kenh['Kenh']['sdt']; ?>&nbsp;</td>
		<td><?php echo $kenh['Loaikenh']['loaikenh']; ?>&nbsp;</td>
		<td class="actions">
			
			<?php echo $this->Html->link(__('Sửa', true), array('action' => 'suakenh', $kenh['Kenh']['id'])); ?>
			<?php echo $this->Html->link(__('Xóa', true), array('action' => 'xoakenh', $kenh['Kenh']['id']), null, sprintf(__('Bạn muốn xóa kênh bán hàng %s?', true), $kenh['Kenh']['tenkenh'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('Trước', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('Sau', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
